/*************************************************************************
	> File Name: B3625.cpp
	> Author: yufangze
	> Mail: 2224590123@qq.com
	> Created Time: 2024-12-16 18:11:12
 ************************************************************************/
#include <iostream>
using namespace std;

#define MAX_N 100

char grid[MAX_N + 5][MAX_N + 5];
int visit[MAX_N + 5][MAX_N + 5];
int n, m, flag = 0;
int dir[4][2] = {
    {-1, 0}, {1, 0}, {0, -1}, {0, 1}
};

void dfs(int x, int y) {
    if (x == n - 1 && y == m - 1) {
        flag = 1;
        return ;
    }
    for (int k = 0; k < 4; k++) {
        int dx = x + dir[k][0];
        int dy = y + dir[k][1];
        if (dx < 0 || dx >= n || dy < 0 || dy >= m) continue;
        if (grid[dx][dy] != '.' || visit[dx][dy] == 1) continue;
        visit[dx][dy] = 1;
        dfs(dx, dy);
        if (flag) return ;
    }
    return ;
}

int main() {
    cin >> n >> m;
    for (int i = 0; i < n; i++) {
        scanf("%s", grid[i]);
    }
    visit[0][0] = 1;
    dfs(0, 0);
    cout << (flag ? "Yes" : "No") << endl;
    return 0;
}
